package com.saxon.mybatis_plus.controller;


import com.saxon.mybatis_plus.pojo.User;
import com.saxon.mybatis_plus.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author saxon
 * @since 2020-10-30
 */
@RestController
@RequestMapping ("/user")
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping ("/getAll")
    public List<User> getAllList(){
        return userService.getUserList ();
    }
}

